import request from '@/utils/request'

export function xhrAnchorAuthList(params = {
  limit: 20,
  page: 1
}) {
  return request({
    url: '/anchor/list',
    method: 'get',
    params
  })
}

export function xhrAnchorVerify(data) {
  return request({
    url: '/anchor/verify',
    method: 'put',
    data
  })
}

export function xhrAnchorAvatarList(params = {
  limit: 20,
  page: 1
}) {
  return request({
    url: '/anchor/avatar/list',
    method: 'get',
    params
  })
}

export function xhrAvatarVerify(data) {
  return request({
    url: '/anchor/avatar',
    method: 'post',
    data
  })
}

export function xhrAccostVerify(data) {
  const { status } = data
  return request({
    url: `/check/liver/accost/text/${status}`,
    method: 'put',
    data
  })
}

export function xhrLiverAccostText(params) {
  return request({
    url: '/check/liver/accost/text',
    method: 'get',
    params
  })
}

export function xhrDeleteAccostText(params) {
  const { accostTextId } = params
  return request({
    url: `/check/liver/accost/text/${accostTextId}`,
    method: 'delete'
  })
}

export function xhrAnchorPhotosList(params = {
  limit: 20,
  page: 1
}) {
  return request({
    url: '/anchor/photos/list',
    method: 'get',
    params
  })
}

export function xhrPhotosVerify(data) {
  return request({
    url: '/anchor/photos',
    method: 'post',
    data
  })
}
export function xhrAnchorVideosList(params = {
  limit: 20,
  page: 1
}) {
  return request({
    url: '/anchor/video/list',
    method: 'get',
    params
  })
}

export function xhrVideoVerify(data) {
  return request({
    url: '/anchor/video',
    method: 'post',
    data
  })
}

export function xhrAnchorCoverList(params = {
  limit: 20,
  page: 1
}) {
  return request({
    url: '/anchor/cover/list',
    method: 'get',
    params
  })
}

export function xhrCoverVerify(data) {
  return request({
    url: '/anchor/cover',
    method: 'post',
    data
  })
}

export function xhrVideoThumbList(params = {
  limit: 20,
  page: 1
}) {
  return request({
    url: '/anchor/video/thumbs',
    method: 'get',
    params
  })
}

export function xhrVideoThumbAll(params = {
  limit: 20,
  page: 1
}) {
  return request({
    url: '/anchor/video/thumb/all',
    method: 'get',
    params
  })
}

export function xhrVideoThumbVerify(params) {
  return request({
    url: '/anchor/video/thumb/verify',
    method: 'get',
    params
  })
}

export function xhrVideoUserVerify(params) {
  return request({
    url: '/anchor/video/user/verify',
    method: 'get',
    params
  })
}

export function xhrVideoThumbDelete(params) {
  return request({
    url: '/anchor/video/thumb/delete',
    method: 'get',
    params
  })
}

export function xhrImmsgList(params) {
  return request({
    url: '/anchor/immsgs',
    method: 'get',
    params
  })
}

export function xhrImmsgSessionList(params) {
  return request({
    url: '/anchor/immsgs/session',
    method: 'get',
    params
  })
}

export function xhrImmsgVerify(params) {
  return request({
    url: '/anchor/immsgs/verify',
    method: 'get',
    params
  })
}

export function xhrImmsgDelete(params) {
  return request({
    url: '/anchor/immsgs/delete',
    method: 'get',
    params
  })
}

export function xhrAnchorAuditList(params) {
  return request({
    url: '/anchor/goddess/list',
    method: 'get',
    params
  })
}

export function xhrAnchorAudit(data) {
  return request({
    url: '/anchor/goddess',
    method: 'put',
    data
  })
}

export function xhrCommentAudit(params) {
  return request({
    url: '/check/comments',
    method: 'get',
    params
  })
}

export function xhrPostAudit(params) {
  return request({
    url: '/anchor/post/list',
    method: 'get',
    params
  })
}

export function getDynamicCommentList(params) {
  return request({
    url: '/dynamic/comment/list',
    method: 'get',
    params
  })
}

export function getDynamicGetTopicList(params = {
  limit: 20,
  page: 1
}) {
  return request({
    url: '/dynamic/get_topic_list',
    method: 'get',
    params
  })
}

export function getUserIntimacyDetail(params) {
  return request({
    url: '/user/intimacy/detail',
    method: 'get',
    params
  })
}

export function getDynamicUpdateTopic(data) {
  return request({
    url: '/dynamic/add_or_update_topic',
    method: 'post',
    data
  })
}

export function getDynamicDetail(params) {
  return request({
    url: '/anchor/post/detail',
    method: 'get',
    params
  })
}

export function getCircleList(params) {
  return request({
    url: '/dynamic/get_circle_list',
    method: 'get',
    params
  })
}

export function updateContentInfo(data) {
  return request({
    url: '/dynamic/update_content_info',
    method: 'post',
    data
  })
}

export function updateDynamicReview(data) {
  return request({
    url: "/dynamic/review_contentId",
    method: 'post',
    data
  })
}

export function xhrCommentDelete(params) {
  return request({
    url: '/check/comments/delete',
    method: 'delete',
    params
  })
}

export function xhrPostDelete(data) {
  return request({
    url: '/anchor/post/delete',
    method: 'delete',
    data
  })
}

export function xhrPostRecommend(data) {
  const { contentId, type } = data
  return request({
    url: `/check/recommend/${contentId}/${type}/0`,
    method: 'put',
    data
  })
}

export function xhrCommentHandle(data) {
  return request({
    url: '/dynamic/comment/review_comment',
    method: 'post',
    data
  })
}

export function xhrPostHandle(data) {
  return request({
    url: '/anchor/post/handle',
    method: 'post',
    data
  })
}

export function xhrDelAvatar(data) {
  return request({
    url: '/check/avatar_delete',
    method: 'post',
    data
  })
}

export function xhrDelBg(data) {
  return request({
    url: '/check/background/image_delete',
    method: 'post',
    data
  })
}

export function xhrDelphoto(data) {
  return request({
    url: '/check/photos_delete',
    method: 'post',
    data
  })
}

export function xhrIllegalList(params) {
  return request({
    url: '/user/illegal',
    method: 'get',
    params
  })
}

export function xhrIllegalRead(data) {
  return request({
    url: '/user/illegal',
    method: 'post',
    data
  })
}

export function xhrIllegalKeyword() {
  return request({
    url: '/user/illegal/keyword',
    method: 'get'
  })
}

export function xhrIllegalKeywordAdd(data) {
  return request({
    url: '/user/illegal/keyword',
    method: 'post',
    data
  })
}

export function xhrIllegalKeywordDel(params) {
  return request({
    url: '/user/illegal/keyword/' + params,
    method: 'delete'
  })
}
export function xhrAnchorNameList(params = {
  limit: 20,
  page: 1
}) {
  return request({
    url: '/check/nickname/list',
    method: 'get',
    params
  })
}
export function xhrNameVerify(data) {
  return request({
    url: '/check/nickname',
    method: 'post',
    data
  })
}

export function xhrAnchorIntroList(params = {
  limit: 20,
  page: 1
}) {
  return request({
    url: '/check/intro/list',
    method: 'get',
    params
  })
}

export function xhrIntroVerify(data) {
  return request({
    url: '/check/intro',
    method: 'post',
    data
  })
}
